package uba.fi.tda.tp1.sorts;

public class BubbleSort extends GenericSort{

	/**
	 * {@inheritDoc}
	 */
	@Override
	protected int[] sortMethod(int[] numbers) {
		int lenght = numbers.length;
		
		for (int j=0; j<lenght; j++){
	        for (int i=0; i < lenght-1; i++) {
	            if (numbers[i] > numbers[i+1]) {
	                int temp = numbers[i];  
	                numbers[i] = numbers[i+1];  
	                numbers[i+1] = temp;
	                
	            }
	        }
	    }
		return numbers;
	}
	

}
